package com.yoke.service;

import com.yoke.system.SystemBean;
import org.springframework.stereotype.Service;

import java.io.File;

/**
 * Created by jiangzeyin on 2017/5/17.
 */
public class BaseService {

    public File getConfFile() {
        String path = String.format("%s/conf", SystemBean.getInstance().getEnvironment().getProperty("order.conf"));
        return new File(path);
    }

    /**
     * @return
     */
    public File getCustomerFile() {
        return new File(getConfFile(), "customer");
    }

    public File getCustomerInfoFile() {
        return new File(getConfFile(), "customer/info.conf");
    }

//    protected File getCustomerFile() {
//        return new File(NginxBaseControl.getOrderPath(), "conf/customer/");
//    }


    public File getOrderTypeFile() {
        return new File(getConfFile(), "ordertype");
    }

//    public static String getOrderPath() {
//        return SystemBean.getInstance().getEnvironment().getProperty("order.conf");
//    }

//    protected String getOrderUserConfFile() {
//        return String.format("%s/conf/customer/info.conf", getOrderPath());
//    }
}
